package com.zgh.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("blog")
public class Blog implements Serializable {
    private static final long serialVersionUID = 3L;
    @TableId(value = "id", type = IdType.AUTO)
    private int id;
    private String title;
    private String content;
    @TableField("coverUrl")
    private String coverUrl;
    private String tag;
    @TableField("userId")
    private int userId;
    private String author;
    private int views;
    private int thumbs;
    private int status;
    private int collections;
    @TableField("releaseTime")
    private String releaseTime;
    @TableField("provinceId")
    private int provinceId;
    private int comments;
    private String position;
    @TableField("provinceName")
    private String provinceName;
    @TableField(exist = false)
    private User user;
    @TableField(exist = false)
    private List<BlogClassification> classificationList;
    @TableField(exist = false)
    private List<BlogComment> blogCommentList;

}
